function info=newinfo(info_msg,varargin)
% newinfo: Create a new information box object
%
% SYNTAX:
%   info = newinfo(info_msg,prop1,value1,...)
%   Return generated MADS.Info object info from specified information message and properties
%   Type "newinfo('')" to see available properties and their default values. 
%   
% See also DRAWINFO

%   Author: Hongbin Ma
%   Last updated: 2009-6-2 with MATLAB 6.5
%   Problems or suggestions? Email me: mathmhb[at]163.com

info=struct('type','MADS.Info',varargin{:});
info.String=info_msg;
info=set_field(info,'Position',[]);
info=set_field(info,'FontName','Helveta');
info=set_field(info,'FontSize',14);
info=set_field(info,'FontAngle','normal');
info=set_field(info,'FontWeight','bold');
info=set_field(info,'Color',[0 0 1]);
info=set_field(info,'EdgeColor',[1 0 0]);
info=set_field(info,'BackgroundColor',[0 1 0]);
info=set_field(info,'HorizontalAlignment','left');
info=set_field(info,'VerticalAlignment','middle');
info=set_field(info,'Rotation',0);
info=set_field(info,'Margin',2);

